// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * DirectoryCountryRegionName generated by hbm2java
 */
@Entity
@Table(name = "directory_country_region_name", catalog = "magento")
public class DirectoryCountryRegionName implements java.io.Serializable {

	private DirectoryCountryRegionNameId id;
	private DirectoryCountryRegion directoryCountryRegion;
	private String name;

	public DirectoryCountryRegionName() {
	}

	public DirectoryCountryRegionName(DirectoryCountryRegionNameId id,
			DirectoryCountryRegion directoryCountryRegion, String name) {
		this.id = id;
		this.directoryCountryRegion = directoryCountryRegion;
		this.name = name;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "locale", column = @Column(name = "locale", nullable = false, length = 8)),
			@AttributeOverride(name = "regionId", column = @Column(name = "region_id", nullable = false)) })
	public DirectoryCountryRegionNameId getId() {
		return this.id;
	}

	public void setId(DirectoryCountryRegionNameId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "region_id", nullable = false, insertable = false, updatable = false)
	public DirectoryCountryRegion getDirectoryCountryRegion() {
		return this.directoryCountryRegion;
	}

	public void setDirectoryCountryRegion(
			DirectoryCountryRegion directoryCountryRegion) {
		this.directoryCountryRegion = directoryCountryRegion;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
